//
//  ZNXAxisView.h
//  ZNChart
//
//  Created by Yim on 16/9/24.
//  Copyright © 2016年 LQ. All rights reserved.
//

#import <UIKit/UIKit.h>
@class ZNXAxisView;

@protocol ZNXAxisViewDelegate <NSObject>
@optional;

- (void)buttonClickEvent:(UIButton *)button andIndex:(NSInteger)index andView:(ZNXAxisView *)view;

@end

@interface ZNXAxisView : UIView

/** *协议 */
@property (nonatomic , weak) id<ZNXAxisViewDelegate>delegate;

/**  *  y轴宽度    */
@property (nonatomic , assign) CGFloat yAxisWidth;

/**  *  坐标点数组    */
@property (nonatomic , strong) NSArray *points;

/**  *  x轴最大值    */
@property (nonatomic , assign) CGFloat yAxisMaxValue;

/**
 *  x轴文字与坐标轴间隙
 */
@property (assign, nonatomic) CGFloat xAxisTextGap;
/**  *  y轴分为几段    */
@property (nonatomic , assign) int yAxisNumber;
/**
 *  是否显示横向分割线
 */
@property (assign, nonatomic, getter=isShowSeparate) BOOL showSeparate;
/**
 *  是否将颜色充满图表
 */
@property (assign, nonatomic, getter=isChartViewFill) BOOL chartViewFill;
/**
 *  横向分割线的颜色
 */
@property (strong, nonatomic) UIColor *separateColor;
/**   画线的颜色*/
@property (strong, nonatomic) UIColor *lineColor;
/**   设置画折线 */
@property (assign, nonatomic) BOOL isChartLine;

/** 画线的宽度*/
@property(nonatomic,assign)CGFloat lineWidth;

/**   图表充满时是否显示点 */
@property (assign, nonatomic, getter=isShowPoint) BOOL showPoint;
/**   设置点的形状方形或圆形 */
@property (assign, nonatomic) BOOL isRound;

/**  *  pageView    */
@property (nonatomic , assign) int pageView;

/**
 *  点与点之间的间距
 */
@property (assign, nonatomic) CGFloat pointGap;
/** 是否显示柱状图 */
@property (nonatomic, assign) BOOL isShowPillar;
/** 柱状图颜色 */
@property (nonatomic, assign) UIColor* pillarColor;
/**
 *  顶部空白区域
 */
@property (assign, nonatomic) CGFloat topMargin;
/** *  文字大小 */
@property (strong, nonatomic) UIFont *textFont;
/** *  文字颜色 */
@property (strong, nonatomic) UIColor *textColor;
/**
 *  坐标轴颜色
 */
@property (strong, nonatomic) UIColor *axisColor;
/**
 *  x轴的文字集合
 */
@property (strong, nonatomic) NSArray *xAxisTitleArray;
/**
 *  是否添加百分号
 */
@property (assign, nonatomic, getter=isPercent) BOOL percent;
/**
 *  横坐标平是否只显示首尾Label
 */
@property (assign, nonatomic, getter=isShowHeadAndTail) BOOL showHeadAndTail;
/**
 *  是否显示点Label
 */
@property (assign, nonatomic, getter=isShowPointLabel) BOOL showPointLabel;
/**
 *  点是否允许点击
 */
@property (assign, nonatomic, getter=isPointUserInteractionEnabled) BOOL pointUserInteractionEnabled;

///**  *  文本的高度    */
//@property (nonatomic , assign) CGFloat textHeight;


- (void) drawView;

@end
